#pragma once
#include <map>
#include <string>
#include <d3dx9.h>


class Material
{
	std::map< std::string, int> intTable;
	std::map< std::string, float> floatTable;
	std::map< std::string, D3DXMATRIX> matrixTable;
	std::map< std::string, D3DXVECTOR4> vectorTable;
	std::map< std::string, IDirect3DTexture9* >	textureTable;

	ID3DXEffect *effect;
public:
	Material( ID3DXEffect *effect );
	
	void SetValue( std::string name, int value );
	void SetValue( std::string name, float value);
	void SetValue( std::string name, D3DXMATRIX value);
	void SetValue( std::string name, D3DXVECTOR4 value);
	void SetValue( std::string name, IDirect3DTexture9 *value);

	void UpdateShaderConsts();
	ID3DXEffect *GetEffect();
	
};